<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>index</title>
    <style>
	#pageHeight{
	  height:1300px
	}
    #pageHeight1{
	  height:1300px
	}
    </style>
</head>
<body>
    <div id="container">首页</div>
    <div id="pageHeight"></div>
    <div id="contenttext">内容</div>
    <div id="pageHeight1"></div>
    <a href="second.html" id="fileAccess">打开rawfile文件</a>
    <img src="icon.png" alt="icon" id="imgs">
</body>
<script>
    let ele = document.getElementById('imgs');
    let loadImage;
    ele.onload = function() {
        loadImage = 'load complete';
    };
    function getUserAgent() {
        return navigator.userAgent;
    }
    function test() {
        backToEts.test('backToEts');
    }
    function testRunJavaScript() {
        return 'testRunJavaScript';
    }
    function getPageHeight() {
        let height = document.body.scrollHeight;
        return height;
    }
    function proxy() {
        objName.register('backToEts');
    }
    function registerTest() {
        let str = objName.register();
        console.log(str);
        return str;
    }
    function jsAccess() {
        console.log('web111');
    }
    function consoleTest() {
        console.log('console test');
    }
    function alertTest() {
        alert('alert test');
    }
    function confirmTest() {
        confirm('confirm test');
    }
    function getImgResult() {
        return loadImage;
    }
    function toPrompt() {
        let result = prompt('age', '20');
        console.log('result:'+result);
    }
    function openRawFile() {
        document.getElementById('fileAccess').click();
    }
    function getTitle() {
        return document.title;
    }
    function getNavigatorOnLine() {
        let onlineResult = navigator.onLine;
        return onlineResult;
    }
    function checkPageUpEle() {
        let UpEle = document.getElementById('container').innerText;
        let style = (window.getComputedStyle(document.getElementById('container'), null)).getPropertyValue('visibility');
        console.log('UpEle : ' + UpEle + style);
        return [UpEle, style];
    }
    function checkContentEle() {
        let ContentEle = document.getElementById('contenttext').innerText;
        let style = (window.getComputedStyle(document.getElementById('contenttext'), null)).getPropertyValue('visibility');
        console.log('ContentEle : ' + ContentEle + style);
        return [ContentEle, style];
    }
    function checkPageDownEle() {
        let DownEle = document.getElementById('fileAccess').innerText;
        let style = (window.getComputedStyle(document.getElementById('fileAccess'), null)).getPropertyValue('visibility');
        console.log('DownEle : ' + DownEle + style);
        return [DownEle, style];
    }
    checkPageUpEle();
    checkContentEle();
    checkPageDownEle();
    getNavigatorOnLine();
</script>
</html>